<template>
  <div class="" style="width: 100%; height: calc(100vh - 50px)">
    <div class="listcontainer">
      <div class="eachitem" v-for="item in configlist">
        <div style="background-color: #080; height: 21px" class="fwwcc">
          {{ item.cname }}
        </div>
        <div style="height: calc(100% - 55px - 34px); width: calc(100%);display: flex;flex-wrap: wrap;align-content: flex-start;">
          <div v-for="ii in item.cval.typelist" class="fwwcc" style="height: 35px;width:200px;">
            <span style="width: 100px;display: inline-block;">
            {{ii}}:
            </span>

            <el-switch :active-value="true" :inactive-value="false" >
            </el-switch>
            
          </div>
        </div>

        <div style="height: 68px;background-color: #030;" class="fwwcc">
          <!-- <el-button
            size="mini"
            @click="
              isadd = false;
              bianji(item);
            "
            >配置编辑</el-button
          >
          <el-button size="mini" @click="juedui(item)">绝对布局</el-button>
          <el-button size="mini" @click="scene(item)">三维场景</el-button>
          <el-button size="mini" @click="yulan(item.dpkey)">预览</el-button>
          <el-button size="mini" @click="del(item.dpkey)">删除</el-button> -->
        </div>
      </div>
    </div>
    <el-button type="primary" size="default" @click="saveconfig" style="position: absolute; top: 10px; right: 10px">保存配置</el-button>
    
  </div>
</template>
<script>

import axios from "@/utils/requestshujuyuan";
import { Base64 } from "js-base64";

export default {
  components: {},
  data() {
    return {
      configlist: [
        {

        }
      ]
    };
  },
  computed: {},
  watch: {},
  mounted() {
    this.loadData()
  },
  methods: {
    saveconfig(){

    },
    loadData() {
      axios.get(`get?dpkey=${this.$route.params.dapingid == ':dapingid' ? '350cad60-ca80-11eb-a2c6-333a772719d8' : this.$route.params.dapingid}`).then((res) => {
      this.$store.state.editer.editerdpconfig = res.data[0];
      this.$store.state.editer.rootsetting = JSON.parse(
        Base64.decode(res.data[0].dpvalue)
      );
      this.configlist = this.$store.state.editer.rootsetting['three']['configlist']
    });
    }
  },
};
</script>
<style lang='scss' scoped>
.listcontainer {
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
}
.eachitem {
  width: 400px;
  height: 250px;
  margin: 10px;
  background-color: rgba(50, 153, 194, 0.856);
}
</style>